package cn.jack.test;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.ArrayMap;
import android.util.Log;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    private EditText mEditText;

    private ArrayMap<Integer,String> map = new ArrayMap<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mEditText = findViewById(R.id.am_et_edit);

        findViewById(R.id.am_tv_test).setOnClickListener(v -> {
            String content = mEditText.getText().toString();
            Log.e("TAG", "pressed-------->");
            if (content.isEmpty()) {
                return;
            }
            Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
        });
    }
}